package com.techysky.entity;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.fasterxml.jackson.annotation.JsonIgnore;

import lombok.Data;
import lombok.EqualsAndHashCode;


@Entity
@Table(name="sys_paper")
@Data@EqualsAndHashCode(callSuper=false)
public class Paper extends BaseEntity {

	
	private static final long serialVersionUID = 1L;
	private String createDate;
	private String createUser;
    private String paperName;
	private String examType;
	private Float radioScore;
	private Float checkScore;
	private Float judgeScore;
	private Float askScore;
	private Float fillScore;
	private Float totalTime;
	private Integer radioCount;
	private Integer checkCount;
	private Integer judgeCount;
	private Float totalScore;
	private Integer askCount;
	private Integer fillCount;
	@Transient
	private String status;
	@Transient
	private Integer totalPeople;
	@Transient
	private String qrate;
	@JsonIgnore
	@OneToMany(cascade={CascadeType.REMOVE},mappedBy = "paper",fetch=FetchType.EAGER)
    private Set<QuestionPaper> questionPaper;
   
	@JsonIgnore
	@OneToMany(mappedBy="paper",fetch=FetchType.EAGER)
    private Set<ExamRecord> examRecord;
}